package cn.getech.data.development.mapper;

import cn.getech.data.development.entity.UploadVersionWorkflowResultLog;
import cn.getech.data.development.model.dto.UploadVersionWorkflowResultLogDto;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 上传版本包记录 Mapper 接口
 * </p>
 *
 * @author hujz
 * @since 2020-07-03
 */
@Mapper
public interface UploadVersionWorkflowResultLogMapper extends BaseMapper<UploadVersionWorkflowResultLog> {

    void insertBatch(@Param("uploadVersionWorkflowResultLogDtos") List<UploadVersionWorkflowResultLogDto> uploadVersionWorkflowResultLogDtos);

    void updateStatusByRootId(@Param("uploadVersionLogId") Long uploadVersionLogId,
                            @Param("olderRootId") Long olderRootId,
                            @Param("importStatus") Integer importStatus,
                            @Param("msgList") String msgList);

    void updateStatusByName(@Param("uploadVersionLogId") Long uploadVersionLogId,
                            @Param("olderId") Long olderId,
                            @Param("workflowMenuName") String workflowMenuName,
                            @Param("importStatus") Integer importStatus,
                            @Param("parentMenuFlage") Integer parentMenuFlage,
                            @Param("msgList") String msgList);

    void updateStatusAndJobByName(@Param("uploadVersionLogId") Long uploadVersionLogId,
                            @Param("olderId") Long olderId,
                            @Param("workflowMenuName") String workflowMenuName,
                            @Param("importStatus") Integer importStatus,
                                  @Param("flowType") Integer flowType,
                            @Param("newJobId") Long newJobId,
                            @Param("msgList") String msgList);

    void updateStatusById(@Param("uploadVersionLogId") Long uploadVersionLogId,
                          @Param("olderId") Long olderId,
                          @Param("olderRootId") Long olderRootId,
                          @Param("newWorkflowDataId") Long newWorkflowDataId,
                          @Param("importStatus") Integer importStatus,
                          @Param("msgList") String msgList);

    void updateIsExitById(@Param("id") Long id,
                          @Param("isExit") Integer isExit);

    void updateWorkMenuId(@Param("dataId") Long dataId,
                          @Param("logId")Long logId);

    void updateStatusAndMsgById(@Param("id") Long id,
                                @Param("importStatus") Integer importStatus,
                                @Param("msgList") String msgList);
}
